# Contributor: Tim Magee <timothy@eastlincoln.net>
pkgname=cozy
pkgver=1.2.1
pkgrel=0
pkgdesc="Modern audiobook player for Linux"
url="https://cozy.sh"
# armhf, ppc64le: py3-pylast
# s390x: doubt anyone would use this on a mainframe
arch="noarch !armhf !ppc64le !s390x"
license="GPL-3.0-only"
depends="
	gst-libav
	gst-plugins-bad
	gst-plugins-good
	gst-plugins-ugly
	gtk+3.0
	libdazzle
	libhandy1
	py3-cairo
	py3-distro
	py3-gobject3
	py3-gst
	py3-mutagen
	py3-packaging
	py3-peewee
	py3-requests
	py3-tz
	"
makedepends="
	desktop-file-utils
	gobject-introspection-dev
	gtk+3.0-dev
	libhandy1-dev
	meson
	py3-gobject3-dev
	"
subpackages="$pkgname-pyc $pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/geigi/cozy/archive/refs/tags/$pkgver.tar.gz
	fix-legacy-version.patch
	"
options="!check" # no tests

build() {
	abuild-meson . output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	ln -sfv com.github.geigi.cozy "$pkgdir"/usr/bin/cozy
	python3 -m compileall -fq "$pkgdir"/usr/lib/python*
}

sha512sums="
db6c4a5ed47e139d87ca8a0d3c1d2681305ee565322209240e52acc1ac41c9669fb3ae06ca517d668e5f7a86319861089772b0d7b8f1aa22cfb5462913a9d3f5  cozy-1.2.1.tar.gz
64624f020beb3c2dd8a2a8972da3bd312e26b5d8f6dbbc6af998c2e05feb1991d0298c49209ed08969f1306109fcaa48a6154b647ca1c7cb895b18daa944dd6f  fix-legacy-version.patch
"
